import { useTheme } from '@inkline/theme';
import { useAlertTheme } from '@inkline/component-alert';
import { useBadgeTheme } from '@inkline/component-badge';
import { useBreadcrumbTheme, useBreadcrumbItemTheme } from '@inkline/component-breadcrumb';
import { useButtonTheme } from '@inkline/component-button';
import { useButtonGroupTheme } from '@inkline/component-button-group';
import { useCardTheme } from '@inkline/component-card';
import { useCheckboxTheme, useCheckboxGroupTheme } from '@inkline/component-checkbox';
import { useDrawerTheme } from '@inkline/component-drawer';
import { useFormTheme } from '@inkline/component-form';
import { useFormErrorTheme } from '@inkline/component-form-error';
import { useFormGroupTheme } from '@inkline/component-form-group';
import { useExpandTheme } from '@inkline/component-expand';
import { useGridTheme } from '@inkline/component-grid';
import { useIconTheme } from '@inkline/component-icon';
import { useInputTheme } from '@inkline/component-input';
import { useImageTheme } from '@inkline/component-image';
import { useLoaderTheme } from '@inkline/component-loader';
import { useMediaTheme } from '@inkline/component-media';
import { useModalTheme, useModalContainerTheme } from '@inkline/component-modal';
import { useNavTheme, useNavItemTheme } from '@inkline/component-nav';
import { usePopoverTheme } from '@inkline/component-popover';
import { useRadioTheme, useRadioGroupTheme } from '@inkline/component-radio';
import { useTabsTheme } from '@inkline/component-tabs';
import { useToastTheme, useToastContainerTheme } from '@inkline/component-toast';
import { useToggleTheme } from '@inkline/component-toggle';
import { useTooltipTheme } from '@inkline/component-tooltip';
import { useBlockquoteTheme, useTypographyTheme } from '@inkline/component-typography';
import { defaultDefinitionOptions, DefinitionOptions } from '@inkline/core';

export * from '@inkline/theme';

export function useInklineTheme(userOptions: DefinitionOptions) {
    const options = { ...defaultDefinitionOptions, ...userOptions };

    useTheme(options);
    useAlertTheme(options);
    useBadgeTheme(options);
    useBlockquoteTheme(options);
    useBreadcrumbTheme(options);
    useBreadcrumbItemTheme(options);
    useButtonTheme(options);
    useButtonGroupTheme(options);
    useCardTheme(options);
    useCheckboxTheme(options);
    useCheckboxGroupTheme(options);
    useDrawerTheme(options);
    useExpandTheme(options);
    useFormTheme(options);
    useFormErrorTheme(options);
    useFormGroupTheme(options);
    useGridTheme(options);
    useIconTheme(options);
    useInputTheme(options);
    useImageTheme(options);
    useLoaderTheme(options);
    useMediaTheme(options);
    useModalTheme(options);
    useModalContainerTheme(options);
    useNavTheme(options);
    useNavItemTheme(options);
    usePopoverTheme(options);
    useRadioTheme(options);
    useRadioGroupTheme(options);
    useTabsTheme(options);
    useToastTheme(options);
    useToastContainerTheme(options);
    useToggleTheme(options);
    useTooltipTheme(options);
    useTypographyTheme(options);
}
